//
//  ZCOrderPayTypeCell.m
//  ZCJZ
//
//  Created by sujeking on 2019/2/27.
//  Copyright © 2019年 jeking. All rights reserved.
//

#import "ZCOrderPayTypeCell.h"
#import "TBCityIconFont.h"
@interface ZCOrderPayTypeCell()

@property (weak, nonatomic) IBOutlet UIImageView *checkImv;
@property (weak, nonatomic) IBOutlet UILabel *label;

@end


@implementation ZCOrderPayTypeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.label.hidden = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    if (selected) {
        self.checkImv.image = [UIImage iconWithInfo:TBCityIconInfoMake(@"\U0000e648", 25, [generalToolBox getColorWithHexadecimalColorStr:@"0xC20114"])];
    } else {
        self.checkImv.image = [UIImage iconWithInfo:TBCityIconInfoMake(@"\U0000e647", 25, [generalToolBox getColorWithHexadecimalColorStr:@"0xC20114"])];
    }
}

- (void)setDict:(NSDictionary *)dict {
    if (dict == nil) {
        return;
    }
    _dict = dict;
    NSInteger ids = [[dict valueForKey:@"id"] integerValue];
    NSString *label = [dict valueForKey:@"label"];
    self.label.hidden = NO;
    _type = ids;
    if (ids == 1) {
        self.label.text = [NSString stringWithFormat:@"%@",label];
    } else {
        self.label.text = label;
    }
}

- (void)setWallet:(NSString *)wallet {
    _wallet = wallet;
    self.label.text = [self.label.text stringByAppendingString:[NSString stringWithFormat:@"(余额:￥%.2f)",wallet.floatValue]];
}


@end
